<?php

/**
 * assignment actions.
 *
 * @package    sf_sandbox
 * @subpackage assignment
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class assignmentComponents extends sfComponents {

    public function executeFuturePrograms(sfWebRequest $request) {
        $this->teacher = $this->getUser()->getTeacherObject();
        $school = $this->teacher->getSchool();

        $this->data = ProgramTable::getInstance()->getFuturePrograms($school, $this->is_mandatory);
        $this->my_teachers = $school->getTeachers2();
    }

    public function executeHistoricPrograms(sfWebRequest $request) {
        $this->teacher = $this->getUser()->getTeacherObject();
        $school = $this->teacher->getSchool();

        $this->data = ProgramTable::getInstance()->getHistoricPrograms($school, $this->is_mandatory);
    }

}
